home *** CD-ROM | disk | FTP | other *** search
/ Fine Art Gallery Builder / Fine Art Gallery Builder.iso / pc / Fine_Art_Library / 1_002.swf / scripts / frame_1 / DoAction_2.as next >
Encoding:
Text File  |  2005-06-15  |  4.5 KB  |  170 lines

  1. function mousePress()
  2. {
  3.    if(_root.mainNavMode == "slideShowModeA")
  4.    {
  5.       if(_root.mainNavAttached.slideShowType != 3)
  6.       {
  7.          return undefined;
  8.       }
  9.       _root.setCursor(260);
  10.       _root.artBinAttached.picLabel = " ";
  11.       _root.slideShowOrder.push(this);
  12.       number1 = String(_root.slideShowOrder.length);
  13.       hitSpaceBig._alpha = 50;
  14.       hitSpaceBig.enabled = false;
  15.       return undefined;
  16.    }
  17.    _root.galleryWallAttached.selectCurrent(this);
  18.    this.swapDepths(_root.swapMovie);
  19.    if(this.getDepth() != 50000)
  20.    {
  21.       _root.galleryWallAttached.correctLayers(this);
  22.    }
  23.    this._alpha = 70;
  24.    if(this._currentframe == 2)
  25.    {
  26.       switch(this._x)
  27.       {
  28.          case -165:
  29.             thisObject.artBinInsertPoint = 6;
  30.             break;
  31.          case -60:
  32.             thisObject.artBinInsertPoint = 5;
  33.             break;
  34.          case 45:
  35.             thisObject.artBinInsertPoint = 4;
  36.             break;
  37.          case 150:
  38.             thisObject.artBinInsertPoint = 3;
  39.             break;
  40.          case 255:
  41.             thisObject.artBinInsertPoint = 2;
  42.             break;
  43.          case 360:
  44.             thisObject.artBinInsertPoint = 1;
  45.       }
  46.    }
  47.    this.startDrag();
  48.    this.gotoAndStop(3);
  49.    _root.galleryWallAttached.setScale();
  50.    _root.artBinAttached.picLabel = " ";
  51.    myInterval = setInterval(this,"checkHitCrate",10);
  52. }
  53. function mouseRelease()
  54. {
  55.    _root.setCursor(280);
  56.    if(_root.mainNavMode == "slideShowModeA")
  57.    {
  58.       return undefined;
  59.    }
  60.    _root.setCursor("finger");
  61.    this.stopDrag();
  62.    this.swapDepths(_root.swapMovie);
  63.    this._alpha = 100;
  64.    clearInterval(myInterval);
  65.    if(thisMovieClip.hitBlock.hitTest(_root.artBinAttached.BinMask) && _root.mainNavMode == "artBinModeA")
  66.    {
  67.       if(_root.fileObject.artBinArt.length < 50)
  68.       {
  69.          this.gotoAndStop(2);
  70.          if(thisObject.currentIndex != null)
  71.          {
  72.             thisObject.deleteArt();
  73.             thisObject.currentIndex = null;
  74.             this.swapDepths(_root.artSwapClip1);
  75.             this._xscale = 100;
  76.             this._yscale = 100;
  77.             _root.updateSwapMovie1();
  78.             _level0.artBinAttached.reinsertImage(thisObject.artBinInsertPoint,this,2);
  79.          }
  80.          else
  81.          {
  82.             _level0.artBinAttached.reinsertImage(thisObject.artBinInsertPoint,this,1);
  83.          }
  84.       }
  85.       else
  86.       {
  87.          this._x = thisObject.XCoord;
  88.          this._y = thisObject.YCoord;
  89.          _root.attachMovie("dialBox15","currentDialBox",55000);
  90.       }
  91.    }
  92.    else if(this.hitBlock.hitTest(_root.storeItCrate.overBtn))
  93.    {
  94.       _root.storeItCrateSnd.start();
  95.       thisObject.deleteArt();
  96.       _root.storeItCrate.gotoAndStop(1);
  97.       this.removeMovieClip();
  98.    }
  99.    else
  100.    {
  101.       _root.galWallInstall.start();
  102.       if(thisObject.currentIndex == null)
  103.       {
  104.          if(_root.fileObject.hangingArtArray.length > 49)
  105.          {
  106.             _root.attachMovie("dialBox16","currentDialBox",55000);
  107.             _level0.artBinAttached.reinsertImage(thisObject.artBinInsertPoint,this,1);
  108.             this.gotoAndStop(2);
  109.          }
  110.          else
  111.          {
  112.             this.swapDepths(_root.artSwapClip);
  113.             _root.updateSwapMovie();
  114.             thisObject.insertArt();
  115.          }
  116.       }
  117.       limits = bigClip.getBounds(_root);
  118.       if(limits.yMax < 50 || limits.yMin > 330)
  119.       {
  120.          this._x = thisObject.XCoord;
  121.          this._y = thisObject.YCoord;
  122.          return undefined;
  123.       }
  124.       thisObject.XCoord = this._x;
  125.       thisObject.YCoord = this._y;
  126.    }
  127. }
  128. function checkHitCrate()
  129. {
  130.    if(this.hitBlock.hitTest(_root.storeItCrate.overBtn))
  131.    {
  132.       _root.storeItCrate.gotoAndStop(2);
  133.    }
  134.    else
  135.    {
  136.       _root.storeItCrate.gotoAndStop(1);
  137.    }
  138. }
  139. function mouseRollOver()
  140. {
  141.    if(this._currentframe != 2)
  142.    {
  143.       return undefined;
  144.    }
  145.    _root.artBinAttached.picLabel = thisObject.artistName + ". " + thisObject.picTitle;
  146. }
  147. function mouseRollOut()
  148. {
  149.    _root.artBinAttached.picLabel = " ";
  150. }
  151. function checkFramesLoaded()
  152. {
  153.    if(thisMovieClip._framesloaded >= 3)
  154.    {
  155.       thisObject = _root.MCObjectMatcher.findMatch(fileName,thisMovieClip);
  156.       clearInterval(myInterval);
  157.    }
  158. }
  159. var myInterval;
  160. var picLabel;
  161. var thisMovieClip = this;
  162. var thisObject;
  163. var myInterval = setInterval(checkFramesLoaded,100);
  164. var isFirstPass = true;
  165. if(thisObject == undefined)
  166. {
  167.    getUrl("EVENT:loadComplete", "");
  168.    getUrl("http://www.scottforesman.com", "");
  169. }
  170.